
/* 扩展数组长度 */
int* extend(int* nums, int size, int enlarge) {
    int* res = new int[size + enlarge];
    for (int i = 0; i < size; ++i)
        res[i] = nums[i];
    delete[] nums;
    return res;
}
